package core.tool.jetty.example;

import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;  
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;  
  
public class WebAppContextWithFolderServer {  
    public static void main(String[] args) throws Exception {  
        int port = 8030;
        Server server = new Server();
        Connector connector=new SelectChannelConnector();
        connector.setPort(port);
        server.addConnector(connector);
        System.out.println(System.getProperty("user.dir")+"/WebRoot");
        WebAppContext webapp = new WebAppContext(System.getProperty("user.dir")+"/WebRoot", "/JavaHi");
        server.setHandler(webapp);
        server.start();    	
    }  
}  
